﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="AddPerson.aspx.cs" Inherits="School_Management.AddPerson" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" runat="server">
    <h2>Create Student Record</h2>
    <asp:ValidationSummary ID="StudValidationSummary" runat="server" ForeColor="Red" ValidationGroup="StudentValidationSummary"/>              
    <div class="table">
         <div class="row">
            <div class="cell1">
                <asp:Label ID="lblGroup" runat="server" Text="Group"></asp:Label>
            </div>
            <div class="cell1">
                <asp:DropDownList ID="ddlGroup" runat="server">
               </asp:DropDownList>
          </div>
        </div>
        <br />
        <div class="row">
            <div class="cell1">
                <asp:Label ID="lblName" runat="server" Text="Name"></asp:Label>
            </div>
            <div class="cell1">
                <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="NameRequired" runat="server" ControlToValidate="txtName" 
                                     ErrorMessage="Student Name is required." ToolTip="Student Name is required." 
                                     ValidationGroup="StudentValidationSummary">*</asp:RequiredFieldValidator>
            </div>
        </div>
        <br />
        
        <br />
        <div class="row">
            <div class="cell1">
                <asp:Label ID="lblGender" runat="server" Text="Gender"></asp:Label>
            </div>
            <div class="cell1">
                <asp:CheckBoxList ID="chkGender" runat="server">
                    <asp:ListItem Text="Male" Value="Male" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="Female" Value="Female" ></asp:ListItem>
                </asp:CheckBoxList>
                
            </div>
        </div>
        <br />
        <div class="row">
            <div class="cell1">
                <asp:Label ID="lblAge" runat="server" Text="Age"></asp:Label>
            </div>
            <div class="cell1">
                <asp:TextBox ID="txtAge" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtAge" 
                                     ErrorMessage="Student Age is required." ToolTip="Student Age is required." 
                                     ValidationGroup="StudentValidationSummary">*</asp:RequiredFieldValidator>

            </div>
        </div>
        <br />
        <div class="row">
            <div class="cell1">
                <asp:Label ID="lblAddress" runat="server" Text="Address"></asp:Label>
            </div>
            <div class="cell1">
                <textarea id="txtAddress" cols="20" rows="2" runat="server"></textarea>
            </div>
        </div>
        <br />
        <div class="row">
            <div class="cell1">
                <asp:Label ID="lblPhone" runat="server" Text="Phone No"></asp:Label>
            </div>
            <div class="cell1">
                <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                <%--<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Enter  Valid Phone No"
                ControlToValidate="txtPhone" ValidationGroup="StudentValidationSummary" 
                    ValidationExpression="d*"></asp:RegularExpressionValidator>--%>
            </div>
        </div>
        <br />
        <div class="row">
            <div class="cell1">
                <asp:Label ID="lblImage" runat="server" Text="Photo"></asp:Label>
            </div>
            <div class="cell1">
                <asp:FileUpload ID="FileUpload1" runat="server" />
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="FileUpload1" 
                                     ErrorMessage="Student Photo is required." ToolTip="Student Photo is required." 
                                     ValidationGroup="StudentValidationSummary">*</asp:RequiredFieldValidator>
            </div>
        </div>
        <br />
        <div class="row">
            <div class="cell1">
            </div>
            <div class="cell1">
                <asp:Button ID="btnAdd" runat="server" Text="Create"  ValidationGroup="StudentValidationSummary" 
                    onclick="btnAdd_Click" />
            </div>
        </div>
        <br />
    </div>
</asp:Content>
